#!/bin/bash

mkdir new

for i in *.vrp
do
	nazwa="new-"+$i
	# dimension
	cat $i | head -4 | tail -1 | tr -s " " | cut -f 3 -d " " >tmpout
	cat $i | head -6 | tail -1 | tr -s " " | cut -f 3 -d " " >>tmpout
	tail -n +8 $i | head -n -4 >>tmpout
	./parser <tmpout >new/$i
done
